function updateUserView() {
	this.parent();
}

updateUserView.inherits(BaseView, {
	init : function() {
		this.createUpdateUserView(this.ctrl.model.uId, this.ctrl.model.username, this.ctrl.model.lname, this.ctrl.model.fname, 
			this.ctrl.model.email, this.ctrl.model.addr, this.ctrl.model.phone, this.ctrl.model.role, this.ctrl.model.ban);
	},

	createUpdateUserView : function(id, username, lname, fname, email, addr, phone, role, ban) {
		$id("txtUpdateUserId").value = id;
		$id("txtUpdateUserName").value = username;
		$id("txtUpdateLastName").value = lname;
		$id("txtUpdateFirstName").value = fname;
		$id("txtUpdateEmail").value = email;
		$id("txtUpdateRole").value = role;
		var ddlRole = document.getElementById("txtUpdateRole");
		var opts = ddlRole.options.length;
		for (var i = 0; i < length; i++) {
			if (ddlRole.options[i].value == role) {
				ddlRole.selectedIndex = i;
				break;
			}
		}

		var ddlBan = document.getElementById("txtUpdateBan");
		var opts = ddlBan.options.length;
		for (var i = 0; i < length; i++) {
			if (ddlBan.options[i].value == ban) {
				ddlBan.selectedIndex = i;
				break;
			}
		}

		$id("txtUpdatePhone").value = phone;
		$id("txtUpdateAddress").value = addr;
		$id("btnUpdateUser").setAttribute("onclick", "onClickUpdateStaff()");
	}
}); 